<script setup lang="ts">
import HelloWorld from "./components/HelloWorld.vue";
import { ref } from "vue";
const data = ref();

function huoQuData() {
  console.log(222);
  let result: { id: number; name: string }[] = [];
  for (let i = 0; i < 10000000; i++) {
    result.push({
      id: i,
      name: "张三" + i,
    });
  }

  // data.value = Object.freeze(result);
  // data.value = result;
  console.log(result);

  console.log(data.value);
}
</script>

<template>
  <div>
    <button @click="huoQuData">获取数据</button>
    {{ data?.length }}
  </div>
</template>

<style scoped></style>
